| Total Complexity | 1 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 5 | |||
| 6 | export class IsMealTicketRemovalAlreadyExist { |
||
| 7 | constructor( |
||
| 8 | @Inject('IMealTicketRemovalRepository') |
||
| 9 | private readonly mealTicketRemovalRepository: IMealTicketRemovalRepository |
||
| 10 | ) {} |
||
| 11 | |||
| 12 | public async isSatisfiedBy(user: User, date: Date): Promise<boolean> { |
||
| 13 | return ( |
||
| 14 | (await this.mealTicketRemovalRepository.findOneByUserAndDate( |
||
| 15 | user, |
||
| 16 | date |
||
| 17 | )) instanceof MealTicketRemoval |
||
| 18 | ); |
||
| 21 |